/*
 *  Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  See the NOTICE file distributed with
 *  this work for additional information regarding copyright ownership.
 *  The ASF licenses this file to You under the Apache License, Version 2.0
 *  (the "License"); you may not use this file except in compliance with
 *  the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package org.apache.wikimark.container;

import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;

import javax.servlet.ServletContext;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpSession;

/*
 * @author Sergey I. Salishev
 */
final class HttpSessionImpl implements HttpSession {
	
	private final String id = String.valueOf(new Random().nextInt(Integer.MAX_VALUE));
	
	final Map<String, Cookie> cookies = Collections.synchronizedMap(new HashMap<String, Cookie>());

	public Object getAttribute(String name) {
		if (true) throw new UnsupportedOperationException("not implemented");
		return null;
	}

	public Enumeration<String> getAttributeNames() {
		if (true) throw new UnsupportedOperationException("not implemented");
		return null;
	}

	public long getCreationTime() {
		if (true) throw new UnsupportedOperationException("not implemented");
		return 0;
	}

	public String getId() {
		return id;
	}

	public long getLastAccessedTime() {
		if (true) throw new UnsupportedOperationException("not implemented");
		return 0;
	}

	public int getMaxInactiveInterval() {
		if (true) throw new UnsupportedOperationException("not implemented");
		return 0;
	}

	public ServletContext getServletContext() {
		if (true) throw new UnsupportedOperationException("not implemented");
		return null;
	}

	@Deprecated
	public javax.servlet.http.HttpSessionContext getSessionContext() {
		if (true) throw new UnsupportedOperationException("not implemented");
		return null;
	}

	public Object getValue(String name) {
		if (true) throw new UnsupportedOperationException("not implemented");
		return null;
	}

	public String[] getValueNames() {
		if (true) throw new UnsupportedOperationException("not implemented");
		return null;
	}

	public void invalidate() {
		if (true) throw new UnsupportedOperationException("not implemented");

	}

	public boolean isNew() {
		if (true) throw new UnsupportedOperationException("not implemented");
		return false;
	}

	public void putValue(String name, Object value) {
		if (true) throw new UnsupportedOperationException("not implemented");

	}

	public void removeAttribute(String name) {
		if (true) throw new UnsupportedOperationException("not implemented");

	}

	public void removeValue(String name) {
		if (true) throw new UnsupportedOperationException("not implemented");

	}

	public void setAttribute(String name, Object value) {
		if (true) throw new UnsupportedOperationException("not implemented");

	}

	public void setMaxInactiveInterval(int interval) {
		if (true) throw new UnsupportedOperationException("not implemented");

	}
	
	void update(HttpServletResponseImpl response) {
	}

}
